package joc.contract;

import java.lang.annotation.Annotation;

public class NotNullContract implements Contract {

	@Override
	public Class<? extends Annotation> getAnnotationClass() {
		return NotNull.class;
	}

	@ForFieldInsertAtBeginningOfAllMethods
	@ForFieldInsertAtEndOfAllMethods
	@ForParameterInsertAtBeginningOfMethod
	public boolean checkContract(NotNull annotation, Object value) {
		return value != null;
	}
}
